package com.campus.merchant.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商户营业时间表（支持多时段设置） 前端控制器
 * </p>
 *
 * @author ZhaoYuJie
 * @since 2025-04-18
 */
import com.campus.common.bean.common.Resp;
import com.campus.merchant.bean.merchant.MerchantBusinessHoursSaveBean;
import com.campus.merchant.service.MerchantBusinessHoursService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@RestController
@RequestMapping("/merchantBusinessHours")
public class MerchantBusinessHoursController {
    @Autowired
    private MerchantBusinessHoursService merchantBusinessHoursService;

    @ApiOperation("保存商户营业时间列表")
    @PostMapping("/saveList")
    public Resp saveBusinessHoursList(@Validated @RequestBody MerchantBusinessHoursSaveBean bean) {
        merchantBusinessHoursService.saveBusinessHoursList(bean);
        return Resp.success();
    }
}
